package com.mdd.admin.validate.region;

import com.mdd.common.validator.annotation.IDMust;
import com.mdd.common.validator.annotation.IntegerContains;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import lombok.Data;
import javax.validation.constraints.*;
import java.io.Serializable;

/**
 * 地区参数
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class DevRegionParam implements Serializable {

    private static final long serialVersionUID = 1L;

    public interface create{}
    public interface update{}
    public interface delete{}

    @IDMust(message = "id参数必传且需大于0", groups = {update.class, delete.class})
    private Long id;

    @NotNull(message = "parentId参数缺失", groups = {create.class, update.class})
    @DecimalMin(value = "0", message = "parentId参数值不能少于0", groups = {create.class, update.class})
    private Long parentId;

    @NotNull(message = "level参数缺失", groups = {create.class, update.class})
    @DecimalMin(value = "0", message = "level参数值不能少于0", groups = {create.class, update.class})
    private Integer level;

    @NotNull(message = "name参数缺失", groups = {create.class, update.class})
    @Length(max = 64, message = "name参数不能超出64个字符", groups = {create.class, update.class})
    private String name;

    @NotNull(message = "shortName参数缺失", groups = {create.class, update.class})
    @Length(max = 64, message = "short参数不能超出64个字符", groups = {create.class, update.class})
    private String shortName;

    @NotNull(message = "cityCode参数缺失", groups = {create.class, update.class})
    @Length(max = 10, message = "cityCode参数不能超出10个字符", groups = {create.class, update.class})
    private String cityCode;

    @NotNull(message = "zipCode参数缺失", groups = {create.class, update.class})
    @Length(max = 10, message = "zipCode参数不能超出10个字符", groups = {create.class, update.class})
    private String zipCode;

    @NotNull(message = "gcj02Lng参数缺失", groups = {create.class, update.class})
    @Length(max = 24, message = "gcj02Lng参数不能超出24个字符", groups = {create.class, update.class})
    private String gcj02Lng;

    @NotNull(message = "gcj02Lat参数缺失", groups = {create.class, update.class})
    @Length(max = 24, message = "gcj02Lat参数不能超出24个字符", groups = {create.class, update.class})
    private String gcj02Lat;

    @NotNull(message = "db09Lng参数缺失", groups = {create.class, update.class})
    @Length(max = 64, message = "db09Lng参数不能超出64个字符", groups = {create.class, update.class})
    private String db09Lng;

    @NotNull(message = "db09Lat参数缺失", groups = {create.class, update.class})
    @Length(max = 64, message = "db09Lat参数不能超出64个字符", groups = {create.class, update.class})
    private String db09Lat;

    @NotNull(message = "remark1参数缺失", groups = {create.class, update.class})
    @Length(max = 64, message = "remark1参数不能超出64个字符", groups = {create.class, update.class})
    private String remark1;

    @NotNull(message = "remark2参数缺失", groups = {create.class, update.class})
    @Length(max = 64, message = "remark2参数不能超出64个字符", groups = {create.class, update.class})
    private String remark2;

}
